import { DResponseType, NetEffectObject, YwjObject } from '@/pages/routes/ddx/interface';
import ImgHolder from '@/pages/routes/ddx/assets/holder.png';

export async function getYwjList(): Promise<DResponseType<YwjObject[]>> {
  const dataSource = [
    {
      id: 1,
      title: 'YWJ098745',
      river: '京杭大运河',
      level: 1.23,
    },
    {
      id: 2,
      title: 'YWJ098746',
      river: '京杭大运河3',
      level: 1.13,
    },
    {
      id: 2,
      title: 'YWJ098747',
      river: '京杭大运河3',
      level: 1.26,
    },
    {
      id: 4,
      title: 'YWJ098745',
      river: '京杭大运河',
      level: 1.23,
    },
    {
      id: 5,
      title: 'YWJ098746',
      river: '京杭大运河3',
      level: 1.13,
    },
    {
      id: 6,
      title: 'YWJ098747',
      river: '京杭大运河3',
      level: 1.26,
    },
  ];
  return {
    msg: '获取成功',
    data: dataSource,
    code: 0,
  };
}

export async function getEffectedNetData(): Promise<DResponseType<NetEffectObject[]>> {
  const gwList = [
    {
      title: '污水管网',
      key: 'WS',
      bgColor: '#fffaf0',
      activeColor: '#f7984a',
      data: [
        {
          icon: ImgHolder,
          title: '截流堰数据',
          count: 4,
          total: 6,
          unit: '处',
        },
        {
          icon: ImgHolder,
          title: '截流井数据',
          count: 2,
          total: 7,
          unit: '处',
        },
      ],
    },
    {
      title: '雨水管网',
      key: 'YS',
      bgColor: '#f2fbfd',
      activeColor: '#1d8be0',
      data: [
        {
          icon: ImgHolder,
          title: '截流堰数据',
          count: 4,
          total: 6,
          unit: '处',
        },
        {
          icon: ImgHolder,
          title: '截流井数据',
          count: 2,
          total: 7,
          unit: '处',
        },
        {
          icon: ImgHolder,
          title: '管段长度',
          count: 116.7,
          type: 'single',
          unit: 'km',
        },
      ],
    },
  ];
  return {
    msg: '获取成功',
    data: gwList,
    code: 0,
  };
}
